package gui;


import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;

public class View extends JFrame{
	
	private Controller myController;
	private JButton myJBRun;
	
	
	public View(){
		super("PJAWS"); //set title
		setSize(300, 300); //set window dimensions
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //exit application when clost button is pressed
		FlowLayout flow = new FlowLayout();
		setLayout(flow);
		myJBRun = new JButton("RUN!");
		add(myJBRun);
		setVisible(true);
	}
	
	
	public void setController(Controller c){
		myController = c;
	}
	
	static public void main (String[] args){
		View view = new View();
		Controller controller = new Controller(view);
		view.setController(controller);
	}
	
	
	public void addRunListener(ActionListener al){
		myJBRun.addActionListener(al);
		
	}
	
	
}
